using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

using Kypris2.CoreElements;

namespace GonzalesCore.CoreElements
{
    public class GonzalesCompany : Kypris2.CoreElements.Company 
    {
        public new SystemUser CompanyManager = null;
        public Entity Entity = null;        
        public decimal MileageRate = 0;
        public decimal PettyCashLimit = 0;
        public TypeOfCreditCardPayment CreditCardPaymentType;
        public string DefaultLDAP = "";
        public Int32 CreditCardCutOffDay = 0;
        public Int32 CreditCardActivatedDay = 0;
        public bool UsingVAT = false;

        public string ExpiryDate = "";
        public string CreditCardReminder = "";
        public string ClaimReminder = "";

        public GonzalesCompany() : base() { }
        public GonzalesCompany(string DisplayName) : base() { }
        public GonzalesCompany(string InternalID, string DisplayName) : base(InternalID, DisplayName) { }
    }

    public class GonzalesCompanies : CollectionBase
    {

        public GonzalesCompany this[int index]
        {
            get
            {
                return ((GonzalesCompany)List[index]);
            }
            set
            {
                List[index] = value;
            }
        }

        public int Add(GonzalesCompany value)
        {
            return (List.Add(value));
        }

        public int IndexOf(GonzalesCompany value)
        {
            return (List.IndexOf(value));
        }

        public void Insert(int index, GonzalesCompany value)
        {
            List.Insert(index, value);
        }

        public void Remove(GonzalesCompany value)
        {
            List.Remove(value);
        }

        public bool Contains(GonzalesCompany value)
        {
            // If value is not of type Int16, this will return false.
            return (List.Contains(value));
        }
    }
}
